var pageFun=function(){
			this.pageObj=$(".pagelist div.pagination");
			this.currentObj=$(".pagelist .currentPage");
			this.totalObj=$(".pagelist .totalpage");
			this.perpageObj=$(".pagelist .perpage");
			this.gotoPageObj=$(".pagelist .gotopage");
			this.tt=$('.pagelist .totalnumber');
			this.perPage=10;
			this.currentPage=1;
			this.totalnumber=50;
			this.containerID='';
			this.init=function(perPage,currentPage,totalnumber,containerID){
				this.perPage=perPage; this.currentPage=currentPage; this.totalnumber=totalnumber; this.containerID=containerID; 
				this.setPage();
				this.jumpPage();
			},
			this.setPage=function(){
				var self=this;
				self.pageObj.jPages({
				containerID: self.containerID,
				previous: "上一页",
				next: '下一页',
				perPage: self.perPage,
				totalnumber:self.totalnumber,
				callback: function(pages, items) {
					$(self.currentObj).html(pages.current);
					$(self.totalObj).html(pages.count);
					$(self.perpageObj).html(self.perPage);
                    $(self.tt).html(self.totalnumber);
				},
				getDatas:function(currentpage){
					self.getData(currentpage);
				},
				
			  });
			  
			};
			this.jumpPage=function(){
				var self=this;
				$(".gotopage_button").click(function() {
					var page = parseInt($(self.gotoPageObj).val()); //获取要跳转的页码
					$(self.pageObj).jPages(page);
			    });
 
			    $(self.gotoPageObj).keypress(function(){
			    	var e=window.event||this;
			    	var c=e.keyCode||e.which;
			    	if(c==13){
			    	   var page = parseInt($(self.gotoPageObj).val()); //获取要跳转的页码
					   $(self.pageObj).jPages(page);
			    	} 
			    })
			   
			};
			this.getData=function(currentpage){
				
			}
			
			
		}
		